/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author luksCastro
 */
@Entity
@Table(name = "fallagenerica")
@NamedQueries({
    @NamedQuery(name = "Fallagenerica.findAll", query = "SELECT f FROM Fallagenerica f")})
public class Fallagenerica implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idFallaGen")
    private Integer idFallaGen;
    @Column(name = "descripcionFallaGen")
    private String descripcionFallaGen;
    @OneToMany(mappedBy = "idfallaGen")
    private List<Equipofalla> equipofallaList;

    public Fallagenerica() {
    }

    public Fallagenerica(Integer idFallaGen) {
        this.idFallaGen = idFallaGen;
    }

    public Integer getIdFallaGen() {
        return idFallaGen;
    }

    public void setIdFallaGen(Integer idFallaGen) {
        this.idFallaGen = idFallaGen;
    }

    public String getDescripcionFallaGen() {
        return descripcionFallaGen;
    }

    public void setDescripcionFallaGen(String descripcionFallaGen) {
        this.descripcionFallaGen = descripcionFallaGen;
    }

    public List<Equipofalla> getEquipofallaList() {
        return equipofallaList;
    }

    public void setEquipofallaList(List<Equipofalla> equipofallaList) {
        this.equipofallaList = equipofallaList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idFallaGen != null ? idFallaGen.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Fallagenerica)) {
            return false;
        }
        Fallagenerica other = (Fallagenerica) object;
        if ((this.idFallaGen == null && other.idFallaGen != null) || (this.idFallaGen != null && !this.idFallaGen.equals(other.idFallaGen))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.Fallagenerica[ idFallaGen=" + idFallaGen + " ]";
    }
    
}
